﻿using Orchard.Data.Migration;
using System.Data;

namespace Coevery.Tasacion {
    public class Migrations : DataMigrationImpl
    {
        public int Create()
        {
            SchemaBuilder.CreateTable("InmuebleIdealistaRecord",
                    table => table
                        .Column<int>("Id", c => c.PrimaryKey().Identity())
                        .Column<int>("ViviendaPartRecord_Id") // CHECK ESTA REFERENCIA !!!
                        .Column<string>("AbrAddress")
                        .Column<string>("Address")
                        .Column<bool>("Agency")
                        .Column<string>("AgentLogo")
                        .Column<string>("Condition")
                        .Column<string>("Bathrooms")
                        .Column<string>("Country")
                        .Column<string>("Description")
                        .Column<string>("Distance")
                        .Column<string>("District")
                        .Column<string>("FavComment")
                        .Column<bool>("Favourite")
                        .Column<string>("Floor")
                        .Column<bool>("HasVideo")
                        .Column<string>("Latitude")
                        .Column<string>("Longitude")
                        .Column<string>("Munipality")
                        .Column<string>("Neighborhood")
                        .Column<string>("NumPhotos")
                        .Column<string>("Operation")
                        .Column<string>("PhotosUrl")
                        .Column<string>("Position")
                        .Column<string>("Price")
                        .Column<string>("PropertyCode")
                        .Column<string>("PropertyType")
                        .Column<string>("PropertyTypeCode")
                        .Column<string>("Province")
                        .Column<string>("Region")
                        .Column<string>("Rooms")
                        .Column<bool>("ShowAddress")
                        .Column<string>("Size")
                        .Column<string>("Subregion")
                        .Column<string>("Thumbnail")
                        .Column<string>("TipUsuCd")
                        .Column<string>("Url")
                        .Column<string>("UserCode")
                        .Column<string>("VideoType")
                    );

            SchemaBuilder.CreateTable("FotoRecord",
                    table => table
                        .Column<int>("Id", c => c.PrimaryKey().Identity())
                        .Column<int>("InmuebleIdealistaRecord_Id")
                        .Column<string>("Description")
                        .Column("Img", DbType.Binary, column => column.Unlimited())
                        );
            
            return 3;
        }
    }
}